<template>
	<view class="mainpadding">
		<view class="flexbetween xiahuaxian" @click="jumper('/pages_wode/gerenxx')">
			<view class="ershiba zhonghei">基本信息</view>
			<u-icon name="arrow-right" color="#999999"></u-icon>
		</view>
		<view class="flexbetween xiahuaxian margin_top" v-if="userInfo.is_smrz==1" @click="jumper('/pages_wode/shimingrenz')">
			<view class="ershiba zhonghei">实名认证</view>
			<u-icon name="arrow-right" color="#999999"></u-icon>
		</view>
		<view class="flexbetween xiahuaxian margin_top" v-if="userInfo.is_smrz==2" @click="httpRequest.toast('已认证，无需重复认证！')">
			<view class="ershiba zhonghei">实名认证</view>
			<view class="flexright">
				<view class="xiaolv ershiba margin_right2">已认证</view>
				<u-icon name="arrow-right" color="#999999"></u-icon>
			</view>
		</view>
		<view class="flexbetween xiahuaxian margin_top" @click="jumper('/pages_wode/genghuansjh')">
			<view class="ershiba zhonghei">绑定手机号</view>
			<view class="flexright">
				<view class="ershiba zhonghei margin_right1">{{userInfo.mobile}}</view>
				<u-icon name="arrow-right" color="#999999"></u-icon>
			</view>
		</view>
		<view class="flexbetween xiahuaxian margin_top" @click="jumper('/pages_wode/cheliangxx')">
			<view class="ershiba zhonghei">车辆信息</view>
			<u-icon name="arrow-right" color="#999999"></u-icon>
		</view>
		<view class="flexbetween xiahuaxian margin_top" @click="jumper('/pages_wode/yijianfankui')">
			<view class="ershiba zhonghei">用户反馈</view>
			<u-icon name="arrow-right" color="#999999"></u-icon>
		</view>
		<view class="flexbetween xiahuaxian margin_top" @click="jumper('/pages_wode/changjianwenti')">
			<view class="ershiba zhonghei">常见问题</view>
			<u-icon name="arrow-right" color="#999999"></u-icon>
		</view>
		<view class="flexbetween xiahuaxian margin_top" @click="jumper('/pages_wode/pingtaiguiz')">
			<view class="ershiba zhonghei">平台规则</view>
			<u-icon name="arrow-right" color="#999999"></u-icon>
		</view>
		<view class="flexbetween xiahuaxian margin_top" @click="jumper('/pages_wode/wodefapiaott')">
			<view class="ershiba zhonghei">我的发票抬头</view>
			<u-icon name="arrow-right" color="#999999"></u-icon>
		</view>
		<view class="flexbetween xiahuaxian margin_top" @click="jumper('/pages_wode/huiyuanshuoming?type=4')">
			<view class="ershiba zhonghei">关于我们</view>
			<u-icon name="arrow-right" color="#999999"></u-icon>
		</view>
		<view class="flexbetween xiahuaxian margin_top" @click="jumper('/pages_wode/shouhuodizhi')">
			<view class="ershiba zhonghei">收货地址</view>
			<u-icon name="arrow-right" color="#999999"></u-icon>
		</view>
		<view class="gudingdb mainpadding" @click="outlogin()">
			<view class="hhbtn">退出登录</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")

	export default {
		data() {
			return {
				httpRequest,
				userInfo: {}
			}
		},
		onLoad() {
			this.init()
		},
		methods: {
			init() {
				httpRequest.request('/api/user/index', 'GET', {}).then(res => {
					this.userInfo = res.data
				})
			},
			outlogin() {
				httpRequest.modal('提示', '是否确认出登录', true, (resp) => {
					if (resp) {
						uni.removeStorageSync('token');
						uni.removeStorageSync('user_id');
						uni.removeStorageSync('myinvite_code');
						httpRequest.toast("退出登录成功")
						setTimeout(() => {
							uni.navigateBack(1)
						}, 1000)
					}
				})
			},
			jumper(url) {
				uni.navigateTo({
					url: url
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.hhbtn {
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 41rpx;
		width: 100%;
		height: 82rpx;
		font-size: 32rpx;
		font-family: PingFang SC, PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
		background-color: #A4A4A4;
	}
</style>